package lab02.test06;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Ladder ladder=new Ladder();
        System.out.println("请输入梯形的上底： "+"下底： "+"高： ");
        int top=sc.nextInt();
        int bottom=sc.nextInt();
        int height=sc.nextInt();

        ladder.setTop(top);
        ladder.setBottom(bottom);
        ladder.setHeight(height);

        System.out.println("面积为："+ladder.area());
    }
}
